package com.kingsoft.demo.jxl;

import java.io.File;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;

/**
 * 读取XLS
 * 
 * @author kbl
 *
 */
public class JxlRead {
	
	public static void main(String[] args) throws Exception {
		
		String path = JxlRead.class.getResource("test.xls").getPath();
		System.out.println("path:"+path);
		
		Workbook workbook = Workbook.getWorkbook(new File(path)); 
		Sheet sheet = workbook.getSheet(0); 
		
		Cell cell = sheet.getCell(1, 2);
		System.out.println(cell.getType());
		System.out.println(cell.getContents());
		System.out.println(sheet.getRows());
		System.out.println(sheet.getColumns());
	}

}
